package com.feige.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.feige.pojo.PrivateChatMsg;
import com.feige.pojo.vo.ChatMsgVo;

import java.util.List;

/**
 * <p>
 * 私聊消息表 服务类
 * </p>
 *
 * @author feige
 * @since 2020-12-26
 */
public interface PrivateChatMsgService extends IService<PrivateChatMsg> {

    /**
     * 查询聊天消息
     * @param pageNum
     * @param senderId
     * @param receiverId
     * @param id
     * @return
     */
    List<ChatMsgVo> queryChatMsg(Integer pageNum, String senderId, String receiverId,Long id);

    /**
     * 查询聊天消息总数
     * @param senderId
     * @param receiverId
     * @param id
     * @return
     */
    int queryChatMsgTotal(String senderId, String receiverId,Long id);

    /**
     * 更新消息为已读
     * @param msgIdList
     * @return
     */
    int batchUpdateChatMsg(List<String> msgIdList);

    /**
     * 查询未签收的消息
     * @param receiverId
     * @return
     */
    List<ChatMsgVo> queryUnsignMsg(String receiverId);

}
